Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-matrix

Package Overview
Dependencies
Maintainers
7
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-matrix

Matrix manipulation and computation library

  • 2.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
7
Weekly downloads
 
Created

What is ml-matrix?

The ml-matrix npm package provides a comprehensive set of tools for matrix operations and linear algebra. It is designed to be used in machine learning and data science applications, offering a variety of functionalities such as matrix creation, manipulation, decomposition, and solving linear systems.

What are ml-matrix's main functionalities?

Matrix Creation

This feature allows you to create matrices from arrays. The code sample demonstrates how to create a 2x2 matrix and print it.

const { Matrix } = require('ml-matrix');
const A = new Matrix([[1, 2], [3, 4]]);
console.log(A.toString());

Matrix Operations

This feature supports various matrix operations such as addition, subtraction, multiplication, etc. The code sample shows how to add two matrices.

const { Matrix } = require('ml-matrix');
const A = new Matrix([[1, 2], [3, 4]]);
const B = new Matrix([[5, 6], [7, 8]]);
const C = A.add(B);
console.log(C.toString());

Matrix Decomposition

This feature provides methods for matrix decomposition like Singular Value Decomposition (SVD), LU decomposition, etc. The code sample demonstrates how to perform SVD on a matrix.

const { Matrix, SingularValueDecomposition } = require('ml-matrix');
const A = new Matrix([[1, 2], [3, 4]]);
const svd = new SingularValueDecomposition(A);
console.log(svd.diagonalMatrix.toString());

Solving Linear Systems

This feature allows solving linear systems of equations. The code sample shows how to solve the system Ax = b.

const { Matrix } = require('ml-matrix');
const A = new Matrix([[1, 2], [3, 4]]);
const b = [5, 6];
const x = A.solve(b);
console.log(x.toString());

Other packages similar to ml-matrix

Keywords

FAQs

Package last updated on 28 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc